<template>
  <div style="position: relative;"> 
    <mt-header fixed title="我的资料">
      <mt-button icon="back" @click='$router.back(-1)' slot="left"></mt-button>
    </mt-header>
    <div style="height:40px;"></div>  
    <div>      
      <div class="my-field" style="margin-top: 0;">
        <div class="my-field-img" @click='$router.push("/my/info/head")' >
          <img src="@/assets/img/head/male-2.png" />
        </div>
      </div>
      <div class="my-field">
        <div class="my-field-item">
          <span class="my-field-item-l gray">昵称</span>
          <div class="my-field-item-r" @click='$router.push("/my/info/nickname")' >{{obj.nickName}}</div>
          <i class="fa fa-angle-right"></i>
        </div>
        <div class="my-field-item">
          <span class="my-field-item-l gray">性别</span>
          <div class="my-field-item-r">{{obj.sex == 'male' ? '男' : '女'}}</div>
        </div> 
        <div class="my-field-item">
          <span class="my-field-item-l gray">等级</span>
          <div class="my-field-item-r">平民</div>
        </div> 
        <div class="my-field-item">
          <span class="my-field-item-l gray">积分</span>
          <div class="my-field-item-r">121</div>
        </div> 
        <div class="my-field-item">
          <span class="my-field-item-l gray">附加身份</span>
          <div class="my-field-item-r" @click='$router.push("/my/info/role")' >
            <span class="ml10">教练</span><span class="ml10">裁判</span>            
          </div> 
          <i class="fa fa-angle-right"></i>         
        </div>
        <div class="my-field-item">
          <span class="my-field-item-l gray">球龄</span>
          <div class="my-field-item-r" @click='$router.push("/my/info/playage")' >7年</div>
          <i class="fa fa-angle-right"></i>
        </div>
        <div class="my-field-item">
          <span class="my-field-item-l gray">擅长项目</span>
          <div class="my-field-item-r" @click='$router.push("/my/info/strong")' ><span class="ml10">男单</span><span class="ml10">男双</span><span class="ml10">3V3</span></div>
          <i class="fa fa-angle-right"></i>
        </div> 
        <div class="my-field-item">
          <span class="my-field-item-l gray">技术特点</span>
          <div class="my-field-item-r" @click='$router.push("/my/info/trait")' >
            <span class="ml10">突进型</span><span class="ml10">拉吊型</span><span class="ml10">球控型</span><span class="ml10">快速退压</span><span class="ml10">平抽快打</span>
          </div>
          <i class="fa fa-angle-right"></i>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default { 
  data () {
    return {
      obj: {}
    }
  },
  mounted(){
    this.loading = true; 
    this.axios.get(this._site + 'my/details', {
      params: { id:this.$store.state.userId }          
    }).then(response => {
      var res = response.data;  
      if(res.status == 1){        
        this.obj = res.data;
      }else{ 
        this.$toast({message: '加载失败'});
      }
    }).catch(error => { 
      this.$toast({message: '加载失败'});
    });
    
  },
  computed:{

  }
}
</script>
